package com.alan.validate.constraints.Impl;

import com.alan.validate.constraints.NotEmpty;
import com.alan.validate.util.ParamValidate;

public class NotEmptyValidate implements ParamValidate<NotEmpty, Object> {

	public void initialize(NotEmpty constraintAnnotation) {
		constraintAnnotation.message();
	}

	public boolean isValid(Object value) {
		if (value == null) {
			return false;
		}
		return value.toString().trim().length() > 0;
	}

}
